﻿<%@ Page Language="C#" AutoEventWireup="true" masterpagefile="~/Default.master" CodeFile="Databases.aspx.cs" Inherits="databases"  Title="<%$Resources:web.sitemap, Databases.Title %>"%>
<%@ Register TagPrefix="Toolbar" TagName="HelpLogout" Src="~/Toolbars/HelpLogoutToolbar.ascx" %>
<%@ Register TagPrefix="Location" TagName="Server" Src="~/Toolbars/ServerLocation.ascx" %>
<asp:Content ContentPlaceHolderID="breadcrumb" runat="Server">
    <Location:Server Runat="Server" id="ServerLocation" IsActive="true"></Location:Server>
</asp:Content>
<asp:Content runat="server" ContentPlaceHolderID="navigationpane">
    &nbsp;
</asp:Content>
<asp:Content runat="server" ContentPlaceHolderID="ContentPane">
    <div class="RightCenterWell">
        <table width="100%">
            <tr>
                <td valign="top">
                    <asp:Image ID="icon_databases_32" SkinID="icon_databases_32" runat="Server" />
                </td>
                <td>
                    <span class="header3"><asp:Literal ID="Literal3" Text="<%$Resources:LocalizedText,Database_Title %>" runat="server" /></span>
                    <hr />
                    <p>
                    <asp:Literal ID="Literal2" Text="<%$Resources:LocalizedText,Database_Instruction %>" runat="server" /></p>
                    <br />
                    <br />
                    <hr />
                    <span class="header4"><asp:Literal ID="Literal1" Text="<%$Resources:LocalizedText,Database_AvailableDatabases %>" runat="server" /></span>
                    <p>
                       <asp:Literal ID="Literal6" Text="<%$Resources:LocalizedText,Database_AvailableInstructions %>" runat="server" />
                    </p>
                    <asp:Label ID="lblError" Runat="server" ForeColor="red" Visible="False"></asp:Label>
                    <div class="TableGrid">
                    <asp:DataGrid ID="dgDatabases" Runat="server" GridLines="None" AutoGenerateColumns="False" Width="97.4%" CellPadding="4" CellSpacing="1">
                        <HeaderStyle CssClass="TableHeader"></HeaderStyle>
                        <AlternatingItemStyle CssClass="AlternateTableItem" />
                        <ItemStyle CssClass="TableItem" />
                        <Columns>
                            <asp:TemplateColumn HeaderText="Name">
                                <HeaderStyle Wrap="False"></HeaderStyle>
                                <ItemStyle Wrap="False"></ItemStyle>
                                <ItemTemplate>
                                    <asp:HyperLink ID="Hyperlink1" Runat="server" Text='<%# "&amp;nbsp;" + DataBinder.Eval(Container.DataItem, "Name") %>'
                                        CssClass="databaseListBlack" NavigateUrl='<%# String.Format("DatabaseProperties.aspx?database={0}", DataBinder.Eval(Container.DataItem, "Name")) %>'>
                                    </asp:HyperLink>
                                </ItemTemplate>
                            </asp:TemplateColumn>
                            <asp:BoundColumn DataField="Size" HeaderText="Size" DataFormatString="{0} MB">
                                <HeaderStyle Wrap="False" HorizontalAlign="Right"></HeaderStyle>
                                <ItemStyle Wrap="False" HorizontalAlign="Right"></ItemStyle>
                            </asp:BoundColumn>
                            <asp:TemplateColumn HeaderText="Query">
                                <HeaderStyle Wrap="False" HorizontalAlign="Right"></HeaderStyle>
                                <ItemStyle Wrap="False" HorizontalAlign="Right"></ItemStyle>
                                <ItemTemplate>
                                    <asp:HyperLink ID="QueryDatabase" Runat="server" Text="query" CssClass="databaseListAction"
                                        NavigateUrl='<%# String.Format("QueryDatabase.aspx?database={0}", DataBinder.Eval(Container.DataItem, "Name")) %>'>
                                    </asp:HyperLink>
                                </ItemTemplate>
                            </asp:TemplateColumn>
                            <asp:TemplateColumn HeaderText="Delete">
                                <HeaderStyle Wrap="False" HorizontalAlign="Right"></HeaderStyle>
                                <ItemStyle Wrap="False" HorizontalAlign="Right"></ItemStyle>
                                <ItemTemplate>
                                    <asp:HyperLink ID="DeleteDatabase" Runat="server" Text="delete" CssClass="databaseListAction"
                                        NavigateUrl='<%# String.Format("DeleteDatabase.aspx?database={0}", DataBinder.Eval(Container.DataItem, "Name")) %>'>
                                    </asp:HyperLink>
                                </ItemTemplate>
                            </asp:TemplateColumn>
                        </Columns>
                    </asp:DataGrid>                    
                    </div>
                    <br />
                    <table width="100%" cellspacing="0" cellpadding="0" border="0">
                        <tr>
                            <td align="left">
                                <asp:Button ID="btnAddNewDatabase" OnClick="btnAddNewDatabase_Click" Text="<%$Resources:LocalizedText,Database_AddNew %>" runat="Server" />
                            </td>
                        </tr>
                    </table>
                            
                </td>
            </tr>
        </table>
    </div>
    
</asp:Content>

